home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.arexx / comp.sys.amiga.programmer_20700_000000.msg < prev    next >
Encoding:
Internet Message Format  |  1994-11-27  |  1.4 KB

  1. Path: etek.chalmers.se!chalmers.se!sunic!mcsun!uunet!cbmvax!chrisg
  2. From: chrisg@cbmvax.commodore.com (Chris Green)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Random No.s in AmigaDOS ??
  5. Message-ID: <35821@cbmvax.commodore.com>
  6. Date: 13 Oct 92 12:43:05 GMT
  7. References: <1992Oct12.093044.3346@lugb.latrobe.edu.au>
  8. Reply-To: chrisg@cbmvax.commodore.com (Chris Green)
  9. Organization: Commodore, West Chester, PA
  10. Lines: 18
  11.  
  12. In article <1992Oct12.093044.3346@lugb.latrobe.edu.au> csccm@luxury.latrobe.edu.au (Chris Miles!!) writes:
  13. >
  14. >Can anyone tell me how you make random numbers in AmigaDOS ??
  15. >I want to write a small script file that does different things randomly,
  16. >so how do I get this random number??!
  17. >
  18.     set myvar `rx "say bitand(c2d(import('00df f006'x,4)),255)`
  19.  
  20.     This reads the beam position from the custom chips. Not normally
  21. a good random number source, but perfectly adequate for a shell script.
  22. -- 
  23. *-------------------------------------------*---------------------------*
  24. |Chris Green - Graphics Software Engineer   - chrisg@commodore.COM      f
  25. |                  Commodore-Amiga          - uunet!cbmvax!chrisg       n
  26. |My opinions are my own, and do not         - icantforgettheimpression  o
  27. |necessarily represent those of my employer.- youmadeyouleftaholeinthe  r
  28. |"A screaming comes across the sky..."      - backofmyhead              d
  29. *-------------------------------------------*---------------------------*